package com.company.meituan2021;

import java.util.Arrays;
import java.util.Scanner;

public class Main1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int p = sc.nextInt();
        int q = sc.nextInt();
        int[] aArea = new int[p];
        int[] bArea = new int[q];
        for (int i = 0; i < p; i++) {
            aArea[i] = sc.nextInt();
        }
        for (int i = 0; i < q ; i++) {
            bArea[i] = sc.nextInt();
        }
        Arrays.sort(aArea);
        Arrays.sort(bArea);
        int i = 0,j = 0;
        int common = 0;
        while (i < p && j < q){
            if(aArea[i] == bArea[j]){
                common++;
                i++;
                j++;
            }else if(aArea[i] < bArea[j]){
                i++;
            }else{
                j++;
            }
        }
        System.out.print(p - common);
        System.out.print(" ");
        System.out.print(q - common);
        System.out.print(" ");
        System.out.print(common);

    }
}
